<!DOCTYPE htm PUBLIC "-//W3C//DTD Xhtm 1.0 Transitional//EN" "DTD/xhtm1-transitional.dtd">
<htm xmlns="http://www.w3.org/1999/xhtm" xml:lang="de" lang="de">
<head>
 <meta http-equiv="content-type" content="text/htm; charset=iso-8859-1" />
 <meta http-equiv="content-style-type" content="text/css" />
 <meta name="author" content="Arlsair" />
 <meta name="date" content="2004-01-22" />
 <title>aSharp</title>
 <link rel="stylesheet" type="text/css" href="../../style.css" />
</head><body>
<h1>aSharp</h1>

<h2>&Uuml;bersicht</h2>
<b>Autor:</b> MarcFD<br />
<b>Version:</b> 0.95<br />
<b>Download:</b> <a href="http://ziquash.chez.tiscali.fr/" target="_blank">http://ziquash.chez.tiscali.fr/</a><br />
<b>Kategorie:</b> Sch&auml;rfe/Weichzeichner<br />
<b>Anforderungen:</b> YV12 Farbraum<br />
<hr>
<h2>Description</h2>
Basically, this filter is a very common unsharp mask, simply because unsharp<br>
mask is the most pleasant sharpenning technique for my eyes ^^<br>
but i've added 3 simple ideas i had about sharpening :<br>
- adaptive thresholding to avoid noise enhancement<br>
- block adaptive sharpenning to avoid DCT block edges enhancement<br>
- block based adaptive thresholding to avoid DCT block edges enhancement<br>
<br>
it's optimised for quality, not speed. but... i love speed ^^<br>
so i've added very optimised MMX/ISSE code.<br>
<br>
it's working in YV12 colorspace, and on luma only<br>
(chroma sharpenning seems to only introduce artifacts)<br>
<h3>Usage of asharp :</h3>
	First, add the following line in your .avs script :<br>
	<code><br>
	LoadPlugin("asharp.dll") # because Avisynth 2.5 doesn't support Autoloading yet<br>
	</code><br>
	To do simple unsharp masking with a strength of 2x :<br>
	<code><br>
	asharp(2,0)<br>
	</code><br>
	To try some adaptive sharpenning :<br>
	<code><br>
	asharp(2,4)<br>
	</code><br>
	Suggestion for divx anime decoding :<br>
	<code><br>
	asharp(2.5,4.5,0.25,hqbf=true)<br>
	</code><br>
<h3>Syntax :</h3>
	<code>
	asharp(float "T", float "D", float "B", bool "hqbf")
	</code><br>
	<br>
	<u>T</u> : unsharp masking threshold. 0 will do nothing. (value clamped to [nothing=0..32])<br>
<br>
T=1 is like 32 with ffdsow/Vdub unsharp mask filter, it'll enhance contrast 1x.
Default is T=2.<br>
<p>
	<u>D</u> : adaptive sharpenning strength. (value clamped to [disabled=0..16])<br>
<br>
	set to 0 to disable<br>
	if D>0, adaptive thresholding is enabled.<br>
	the threshold is adapted for each pixel (bigger for edges)<br>
	if adaptive sharpenning is enabled, T acts like a maximum.<br>
	default is D=4<br>
</p>
	<u>B</u> : block adaptive sharpenning. (value clamped to [disabled=0..4])<br>
<br>
	set to a negative value to disable.<br>
	if B>=0, block adaptive sharpenning is enabled.<br>
	it acts very simply, by lowering the threshold around DCT-blocks edges.<br>
	if you use it, avoid any non mod8 cropping between the decoder and asharp.<br>
	(it works only wit adaptive sharpenning, when D>0)<br>
	default is B=-1 (disabled)<br>
<br>
	<br>
	<u>hqbf</u> : high quality block filtering. (aka block based adaptive thresholding.)<br>
<br>
	it was painfull to implement in SIMD, but i love it.<br>
	try with and without on a blocky video, and you'll understand why ^^<br>
	it works only with adaptive thresholding.<br>
	default is false (disabled)<br>
</body>
</html>